<?php
/**
 * GeryEngine
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this release in the file LICENSE
 *
 * @copyright  Copyright (c) 2007 Arjen Brouwer
 * @license    New BSD License
 * @author     Arjen Brouwer
 */

abstract class GeryProxyContext implements IGeryContext {
	
	private $context;
	
	public function __construct(IGeryContext $context) {
		$this->context = $context;
	}
	
	/**
	 * Adds a name/value pair to the context.
	 *
	 * @param key   The name to key the provided value with.
	 * @param value The corresponding value.
	 * @return Object
	 */
	function put($key, $value) {
		return $this->context->put($key, $value);
	}
	
	/**
	 * Gets the value corresponding to the provided key from the context.
	 * 
	 * @param key The name of the desired value.
	 * @return Object The value corresponding to the provided key.
	 */
	function &get($key) {
		return $this->context->get($key);
	}
	
	/**
	 * Indicates whether the specified key is in the context.
	 * 
	 * @param key The key to look for.
	 * @return boolean Whether the key is in the context.
	 */
	function containsKey($key) {
		return $this->context->containsKey($key);
	}

    /**
     * Get all the keys for the values in the context
     */
    function getKeys() {
		return $this->context->getKeys();
	}

    /**
     * Removes the value associated with the specified key from the context.
     *
     * @param key The name of the value to remove.
     * @return    The value that the key was mapped to, or <code>null</code> 
     *            if unmapped.
     */
    function remove($key) {
		return $this->context->remove($key);
	}
	
	/**
	 * Get the chained context this context is wrapping
	 *
	 * @return Context
	 */
	function getChainedContext() {
		return $this->context->getChainedContext();
	}
}
?>